<%@include file="startUpIncludes.jsp" %>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>
            People
        </title>
    <script type="text/javascript" src="../js/modalwin.js">
    </script>
    <script type="text/javascript" src="../js/chatter.js">
    </script>
    </head>
    <body>
    <jsp:include page="header.jsp" >
		<jsp:param value="true" name="loggedIn"/>
	</jsp:include>
    <div class="modal-win-bg">
        <div class="modal-win-box">
            <div class="modal-win-hd">
                <span class="modal-win-title"></span>
                <span class="modal-win-close">x</span>
            </div>
            <div class="modal-win-content"></div>
            <a class="form-btn modal-win-ok">OK</a>
        </div>
    </div>
    <div class="wrap">
	<div class="fitBG">
        <div class="main">
			<jsp:include page="chatterLeftMenu.jsp" >
				<jsp:param value="people" name="currentPage"/>
			</jsp:include>
            <div class="content">
				<jsp:include page="tabs.jsp" >
					<jsp:param value="chatter" name="currentPage"/>
				</jsp:include>
                <div class="tab-content">
                <div class="people-content">
				<h4 class="">People</h4>
                <c:choose>
                <c:when test="${empty companyEmployees}">
                <div class="noData">No data to preview...</div>
                </c:when>
                <c:otherwise>
                    <div class="scroll-table">
                    <table class="people-table">
                        <thead>
                            <tr>
                                <th class="s"></th>
                                <th class="l">Name</th>
                                <th class="s">Follow</th>
                                <th class="s">Calendar</th>
                            </tr>
                        </thead>
                        <tbody>
                        <c:forEach items="${companyEmployees}" var="employee">
                            <tr class="even">
								<td class="s">
								<c:choose>
						          <c:when test="${employee.photo==null}">
						             <a href="#" class="people-img"><img src="../images/noprofile.jpg" alt="user photo"/></a>
						          </c:when>
						          <c:otherwise>
						          	<a href="#" class="people-img"><img src="${employee.photo.encode}" alt="user photo"/></a>
						          </c:otherwise>
						        </c:choose>
								</td>
								<td class="l"><span class="people-name">${ employee.fName } &nbsp; ${ employee.lName }</span></td>
								<td class="s">
                                 <c:choose>
 	                                <c:when test="${employee.isFollowed == true ||employee.id == userDetails.id  }"> 
	                                	<img src="../images/icon-followed.png"/>
	                                </c:when> 
	                                <c:otherwise> 
	                                	<a href="/sales/s/followPeople?empId=${employee.id}"><img src="../images/icon-follow.png"/></a></td>
 	                                </c:otherwise> 
                                 </c:choose> 
								</td>
								<td>
								<a href="/sales/s/calendar?empId=${employee.id}">View</a>
								</td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    </div>
                    </c:otherwise>
                    </c:choose>
				</div>
                <div class="right-menu"></div>
                </div>
            </div>
        </div>
        
<%@include file="footer.jspf" %>
	</div>
    </div>
    

    </body>
</html>